﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ChoViet.CMS.ViewModels.LoadAreaByCountryVM>" %>
<%@ Import Namespace="ChoViet.Model" %>
<%if(Model.CountryID == 1) {%>
<option value="">--Khu vực--</option>
<%}else{ %>
<option value="">--Tiểu bang--</option>
<%} %>
<%
    string OPTION_FORMAT = "<option value='{0}'>{1}</option>";
    if (Model != null && Model.Areas != null && Model.Areas.Count() > 0)
    {
        foreach (var item in Model.Areas)
        {
%>
<%= string.Format(OPTION_FORMAT, item.ID, item.Name) %>
<%}
    }%>

